/*
 *Copyright (c) 2014 fengmang studio. All rights reserved
 *
 *build time 2014/6/25 09:21 
 *
 *Edition:1.0
 *
 *Founder:bluekey
 *
 *File name:keyboard.h
 *
 *Description:Keyboard interface, processing the key.
 */

#ifndef _KEYBOARD_H_
#define _KAYBOARD_H_

extern int speed;

enum{up = 259,down = 258,left = 260,right = 261,stop = 32,esc=27};

class keyboard
{
public:
	int obstruction_read();	//从键盘上读取一个控制字符，一直阻塞　直到接收到按键程序才继续
	int read();		//无阻塞
	int readKey();		//阻塞　ｓｐｅｅｄ　ｍｓ　超过该时间，则继续执行不再阻塞
};

#endif	/*_KEYBOARD_H_*/
